package com.anan.controller;

import com.anan.annotation.CheckObject;
import com.anan.annotation.CheckValue;
import com.anan.annotation.GlobalInterceptor;
import com.anan.entity.dto.UserInfoDto;
import com.anan.entity.po.UserInfo;
import com.anan.entity.query.UserInfoQuery;
import com.anan.exception.BusinessException;
import com.anan.service.UserInfoService;
import com.anan.utils.AnanUtils;
import com.anan.utils.Result;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/user_info")
public class UserInfoController {

    @Resource
    UserInfoService userInfoService;


    @RequestMapping("/add")
    @GlobalInterceptor(checkParams = true, checkLogin = true)
    public Result add(@CheckObject(required = true, checkProperties = {"all"}) @RequestBody UserInfo userInfo) {
        Result result = new Result();

        return result;
    }

    @RequestMapping("/delete")
    @GlobalInterceptor(checkParams = true, checkLogin = true)
    public Result delete(@CheckObject(required = true, checkProperties = {"all"}) @RequestBody UserInfo userInfo) {
        Result result = new Result();

        return result;
    }

    @RequestMapping("/update")
    @GlobalInterceptor(checkParams = true, checkLogin = true)
    public Result update(@CheckObject(required = true, checkProperties = {"all"}) @RequestBody UserInfo userInfo) {
        Result result = new Result();

        return result;
    }

    @RequestMapping("/get")
    @GlobalInterceptor(checkParams = true, checkLogin = true)
    public Result get(@CheckObject(required = true, checkProperties = {"all"}) @RequestBody UserInfo userInfo) {
        Result result = new Result();
        return result;
    }

    @RequestMapping("/list")
    @GlobalInterceptor(checkParams = true, checkLogin = true)
    public Result list(@CheckObject(required = true, checkProperties = {"all"}) @RequestBody UserInfo userInfo) {
        Result result = new Result();
        return result;
    }

    @RequestMapping("/listB")
    @GlobalInterceptor(checkParams = true, checkLogin = true)
    public Result listB(@CheckObject(required = true, checkProperties = {"all"}) @RequestBody UserInfo userInfo,
                        @CheckObject(required = true, checkProperties = {"all"}) @RequestBody List<UserInfo> list) {
        Result result = new Result();
        return result;
    }
}
